package com.ly.consumer.thread.threadSafety;

//以lock的形式来加锁解决线程安全的问题
class MyList {
    //定义个数组 然后通过多线程的形式来对这个数组进行加值
    String [] strArr = {"A","B","",""};
    public void addStr (String str){
        int index = 2;
        strArr[index] = str;
        index++;
    }

}


public class MyLock {









}
